<div class="pl-3 pr-3 bg-white">
    <h4>库位详情</h4>
    <!-- <ts-tabs [tabs]="['新增仓库','仓库合同']" [color]="global.params.color" [target]="tsTabs" activeTab="新增仓库">
        </ts-tabs> -->
</div>
<div class="p-2">
    <div class="card">
        <div class="card-body">
            <div>
                <div class="card-body">
                    <div class="container m-0">
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">所属仓库</label>
                            <div class="col-sm-10" style="display: flex">
                                <select [(ngModel)]="warehous.warehouseId" (change)="getPosition(warehous.warehouseId)" class="custom-select" placeholder="请选择仓库">
                                    <option *ngFor="let type of warehouse" [ngValue]="type.id">{{type.warehouseName}}</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">所在库区</label>
                            <div class="col-sm-10" style="display: flex">
                                <select class="custom-select" [(ngModel)]="warehous.warehouseRegionId" (change)="getwarehouseChanne(warehous.warehouseRegionId)"
                                    placeholder="请选择仓库">
                                    <option value="" style="color: #b6b6b6" disabled selected>请选择</option>
                                    <option *ngFor="let type of position" [ngValue]="type.id">{{type.warehouseRegionName}}</option>
                                </select>
                                <label class="col-sm-2 col-form-label label-required text-right">所在通道</label>
                                <select class="custom-select" [(ngModel)]="warehous.warehouseChannelId" placeholder="请选择通道">
                                    <option value="" style="color: #b6b6b6" disabled selected>请选择</option>
                                    <option *ngFor="let type of Channe" [ngValue]="type.id">{{type.warehouseName}}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">库位名称</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="warehous.warehouseLocationName" type="text" class="form-control" placeholder="请输入库位名称">
                                <label class="col-sm-2 col-form-label label-required text-right">库位层数</label>
                                <input [(ngModel)]="warehous.warehouseLocationLayerNumber" type="text" class="form-control" placeholder="请输入库位层数">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">库位编号</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="warehous.warehouseLocationNumber" type="text" class="form-control" placeholder="请输入库位编号">
                                <label class="col-sm-2 col-form-label label-required text-right">库位体积</label>
                                <input [(ngModel)]="warehous.volume" type="text" class="form-control" placeholder="请输入库位体积">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">库位承重</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="warehous.loadCapacity" type="text" class="form-control" placeholder="请输入库位承重">
                                <label class="col-sm-2 col-form-label label-required text-right">库位码</label>
                                <input [(ngModel)]="warehous.warehouseLocationCode" type="text" class="form-control" placeholder="请输入库位码">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">库位成本</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="warehous.warehouseLocationCost" type="text" class="form-control" placeholder="请输入库位成本">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">条形码</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="warehous.barCode" type="text" class="form-control" placeholder="请输入条形码">
                                <label class="col-sm-2 col-form-label label-required text-right">二维码</label>
                                <input [(ngModel)]="warehous.qrCode" type="text" class="form-control" placeholder="请输入二维码">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">库位（cm）</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="warehous.length" type="text" class="form-control" placeholder="请输入长">
                                <input [(ngModel)]="warehous.width" type="text" class="form-control" placeholder="请输入宽">
                                <input [(ngModel)]="warehous.height" type="text" class="form-control" placeholder="请输入高">
                            </div>
                        </div>
                        <!-- <div style="height: 45px;font-weight: 900;text-align: center">库位码</div> -->

                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">条形码</label>
                            <div class="col-sm-7" style="display: flex">
                                <img src="assets/images/kogo.png" width="50px" height="50px">
                                <label class="col-sm-3 col-form-label label-required text-right">二维码</label>
                                <img src="assets/images/kogo.png" width="50px" height="50px">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="mt-2 m-btn">
                    <button routerLink="/warehous/warehous" tsBtn color="white">返回列表</button>
                    <button *ngIf="warehous.id===0" tsBtn loading color="success" (submit)="confirmInsert($event)">确认添加</button>
                    <button tsBtn color="warning">添加</button>
                    <button *ngIf="warehous.id>0" tsBtn loading color="primary" (submit)="confirmUpdate($event)">确认修改</button>
                    <!-- (click)="resetForm()" -->
                </div>
            </div>
        </div>
    </div>
</div>